<template>
  <div>
    <!-- <a-row :gutter="24">
      <a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">
        <chart-card :loading="loading" title="本月定制盒子成交金额" :showFooter="false" class="amount-card">
          <ellipsis :length="10" tooltip slot="total">¥ {{ amount }}</ellipsis>
        </chart-card>
      </a-col>
      <a-col :xl="24" :lg="24" :md="24" :sm="24" :xs="24"> </a-col>
    </a-row> -->
    <a-card :bordered="false" style="margin-bottom: 12px" v-if="isFashioner">
      <div style="margin-bottom: 12px">
        <span style="font-size: 16px; font-weight: 700">业绩统计</span>
        <a-select style="width: 100px; margin-left: 10px" @change="handleChangeTime" v-model="timeType">
          <a-select-option value="0"> 今日 </a-select-option>
          <a-select-option value="1"> 昨日 </a-select-option>
          <a-select-option value="7"> 近7天 </a-select-option>
          <a-select-option value="30"> 近30天 </a-select-option>
        </a-select>
      </div>
      <div style="display: flex; justify-content: space-between">
        <div style="font-size: 16px">
          搭盒数/成交数：{{ collocationNum }}/{{ dealNum }} | 订单金额
          <a-tooltip placement="top">
            <template slot="title">
              <span>含优惠券金额</span>
            </template>
            <a-icon type="info-circle" />
          </a-tooltip>
          ：¥ {{ orderTotAmount }}
        </div>
        <a @click="clickDetail">详情</a>
      </div>
    </a-card>
    <!-- <router-link :to="`/box/serviceOrder/list/fashioner${timeType}`">详情</router-link> -->
    <a-card :bordered="false" class="top-card">
      <a-tabs v-model="currentTab" @change="tabsChange">
        <a-tab-pane :key="0" tab="主动要盒会员">
          <FilterTree
            :treeData="baseTree"
            :highTreeData="highParamTree"
            @updateParams="updateParams"
            :searchPlaceholder="'请输入昵称/手机号'"
            @updateSearchText="updateSearchText"
            :showRootArray="false"
            :showHighest="true"
          ></FilterTree>
          <a-divider dashed style="margin-top: 12px" />
          <div class="table-page-search-wrapper">
            <a-form layout="inline">
              <a-row :gutter="48">
                <!-- <a-col :md="8" :sm="24">
                      <a-form-item label="用户昵称/手机号">
                        <a-input v-model="queryParam.search" placeholder="请输入" />
                      </a-form-item>
                    </a-col> -->
                <a-col :xxl="6" :xl="8" :lg="12" :sm="24">
                  <a-form-item label="排序">
                    <a-select v-model="queryParam.sorted" placeholder="请选择" :dropdownStyle="{ zIndex: '5' }" @change="handleChange">
                      <a-select-option :value="1">要盒时间倒序</a-select-option>
                      <a-select-option :value="2">累计消费金额从高到低</a-select-option>
                      <a-select-option :value="3">会员积分降序</a-select-option>
                      <a-select-option :value="4">流转时间倒序</a-select-option>
                    </a-select>
                  </a-form-item>
                </a-col>
                <a-col :xxl="6" :xl="8" :lg="12" :sm="24" v-has="'workbench:notFashioner'">
                  <a-form-item label="搭配师类型">
                    <a-select v-model="queryParam.fashionerType" placeholder="请选择" @change="handleChangeType">
                      <a-select-option value="">全部</a-select-option>
                      <a-select-option :value="0">搭配师</a-select-option>
                      <a-select-option :value="1">导购</a-select-option>
                    </a-select>
                  </a-form-item>
                </a-col>
                <a-col :xxl="6" :xl="8" :lg="12" :sm="24">
                  <a-form-item label="要盒渠道">
                    <a-select v-model="queryParam.channelId" placeholder="请选择" @change="handleChange">
                      <a-select-option value="">全部</a-select-option>
                      <a-select-option :value="item.mark" v-for="(item, index) in channelList" :key="index">{{ item.name }}</a-select-option>
                    </a-select>
                  </a-form-item>
                </a-col>

                <a-col :xxl="6" :xl="8" :lg="12" :sm="24" v-if="queryParam.fashionerType === 0">
                  <a-form-item label="所属搭配师">
                    <a-select v-model="queryParam.fashionerId" placeholder="请选择" show-search :allowClear="true" :filter-option="filterOption" @change="handleChange">
                      <a-select-option value="">全部</a-select-option>
                      <a-select-option :value="item.id" v-for="(item, index) in fashionerList" :key="index">{{ item.name }}</a-select-option>
                    </a-select>
                  </a-form-item>
                </a-col>
                <a-col :xxl="6" :xl="8" :lg="12" :sm="24" v-if="queryParam.fashionerType === 1">
                  <a-form-item label="导购手机号">
                    <a-input v-model="queryParam.salePhone" placeholder="请输入" :allowClear="true" @keyup.enter="searchSalesPhone" @change="onChangePhone" ref="salesPhone" />
                  </a-form-item>
                </a-col>
                <a-col :xxl="6" :xl="8" :lg="12" :sm="24">
                  <a-form-item label="有可用生日折扣券">
                    <a-switch default-checked @change="switchChange" v-model="queryParam.isBirthday" />
                  </a-form-item>
                </a-col>
                <!-- <a-col :md="8" :sm="24">
                      <a-form-item label="超期筛选">
                        <a-select v-model="queryParam.overdue" placeholder="请选择" @change="handleChange">
                          <a-select-option value="null">全部</a-select-option>
                          <a-select-option :value="0">未超期</a-select-option>
                          <a-select-option :value="1">超期24小时</a-select-option>
                          <a-select-option :value="2">超期48小时</a-select-option>
                          <a-select-option :value="3">超期5天</a-select-option>
                        </a-select>
                      </a-form-item>
                    </a-col>
                    <a-col :md="col" :sm="24">
                      <span class="table-page-search-submitButtons" :style="{ float: 'right', overflow: 'hidden' }">
                        <a-button type="primary" @click="searchList">查询</a-button>
                        <a-button style="margin-left: 18px" @click="resetList">重置</a-button>
                      </span>
                    </a-col> -->
              </a-row>
            </a-form>
          </div>
        </a-tab-pane>
        <a-tab-pane :key="1" tab="超时盒子抢单池" v-if="showGrabTab">
          <div class="table-page-search-wrapper">
            <a-form layout="inline">
              <a-row :gutter="48">
                <a-col :xxl="6" :xl="8" :lg="12" :sm="24">
                  <a-form-item label="用户昵称/手机号">
                    <a-input v-model="queryGrabParam.searchText" placeholder="请输入" />
                  </a-form-item>
                </a-col>
                <a-col :xxl="6" :xl="8" :lg="12" :sm="24">
                  <a-form-item label="所属导购工号">
                    <a-input v-model="queryGrabParam.linkId" placeholder="请输入" />
                  </a-form-item>
                </a-col>
                <a-col :xxl="6" :xl="8" :lg="12" :sm="24">
                  <a-form-item label="上次服务搭配师">
                    <a-select v-model="queryGrabParam.lastFashionerId" placeholder="请选择" show-search :allowClear="true" :filter-option="filterOption">
                      <a-select-option value="">全部</a-select-option>
                      <a-select-option :value="item.id" v-for="(item, index) in fashionerList" :key="index">{{ item.name }}</a-select-option>
                    </a-select>
                  </a-form-item>
                </a-col>
                <a-col :xxl="6" :xl="8" :lg="12" :sm="24">
                  <a-form-item label="选择日期">
                    <a-range-picker style="width: 100%" showToday valueFormat="YYYY-MM-DD" format="YYYY-MM-DD" v-model="queryGrabParam.time" />
                  </a-form-item>
                </a-col>
                <a-col :xxl="24" :xl="16" :lg="24" :sm="24">
                  <span class="table-page-search-submitButtons" :style="{ float: 'right', overflow: 'hidden', marginBottom: '24px' }">
                    <a-button type="primary" @click="searchList">查询</a-button>
                    <a-button style="margin-left: 18px" @click="resetList">重置</a-button>
                    <a-button style="margin-left: 18px" @click="showModal({}, 'assignment')" v-show="selectedRowKeys.length > 0" v-has="'workbench:distribute'">批量分配</a-button>
                  </span>
                </a-col>
              </a-row>
            </a-form>
          </div>
        </a-tab-pane>
        <!-- <a-tab-pane key="1" tab="可服务会员" disabled></a-tab-pane>
            <a-tab-pane key="2" tab="自动发盒会员" disabled></a-tab-pane> -->
        <template v-if="isFashioner">
          <a-button slot="tabBarExtraContent" @click="openSpreadModal">推广</a-button>
        </template>
      </a-tabs>
    </a-card>
    <a-card :bordered="false" style="margin-top: 12px">
      <s-table
        ref="table"
        size="default"
        :rowKey="record => record.id"
        :columns="columnsList"
        :data="loadData"
        :pagination="paginationProps"
        :rowSelection="currentTab == 1 ? rowSelection : null"
        :scroll="currentTab == 0 ? { x: 1800 } : null"
      >
        <span slot="name" slot-scope="text, record">
          <router-link :to="`/box/customer/info/personal/${record.unionId}?blank=blank`" target="_blank" v-if="currentTab == 0">
            <ellipsis :length="16" tooltip style="color: #40a9ff">{{ text }}</ellipsis>
            <span style="overflow: hidden; display: block">
              <!-- 20220708 经销tag不展示 -->
              <!-- <a-skeleton :loading="record.ifDealer == null" active style="width: 40px; margin: 0; margin-top: 4px" :paragraph="false">
                <a-tag color="red" v-if="record.ifDealer">经销</a-tag>
              </a-skeleton> -->

              <a-tag color="#FAAD14" v-if="record.themeAttrId" class="table-tag" :style="{ marginLeft: record.ifDealer ? '4px' : 0 }">活动</a-tag>
              <a-tag color="#f50" v-if="record.channelId == 1005" class="table-tag">90天唤醒</a-tag>
              <a-tag color="#c324ac" v-if="record.channelId == 2000" class="table-tag">导购申请</a-tag>
              <a-tag color="#167fbb" v-if="record.channelId == 3299336444490481664">异业合作</a-tag>
            </span>
          </router-link>
          <span style="color: #40a9ff" v-else>
            {{ text }}
            <span style="overflow: hidden; display: block; margin-top: 4px">
              <!-- <a-skeleton :loading="record.ifDealer == null" active style="width:40px;margin:0;margin-top:4px;" :paragraph="false">
                <a-tag color="red" v-if="record.ifDealer">经销</a-tag>
              </a-skeleton> -->
              <a-tag color="#FAAD14" v-if="record.themeAttrId" class="table-tag" :style="{ marginLeft: record.ifDealer ? '4px' : 0 }">活动</a-tag>
              <a-tag color="#f50" v-if="record.channelId" class="table-tag">90天唤醒</a-tag>
            </span>
          </span>
        </span>
        <span slot="isConnect" slot-scope="text, record">
          <span @click="updateConnect(record, 1)" v-if="text == 0" style="cursor: pointer"> <a-icon type="flag" /> 未联系 </span>
          <span @click="updateConnect(record, 0)" v-if="text == 1" style="cursor: pointer"> <a-icon type="flag" style="color: #87d068" />&nbsp;<span style="color: #87d068">已联系</span> </span>
          <template v-if="text == 1">
            <span v-if="record.connectSuccess == 0" style="cursor: pointer" @click="updateConnectSuccess(record, 1)"> <a-icon type="check-circle" /> 成功联系 </span>
            <span v-if="record.connectSuccess == 1" style="cursor: pointer" @click="updateConnectSuccess(record, 0)">
              <a-icon type="check-circle" style="color: #87d068" />&nbsp;<span style="color: #87d068">成功联系</span>
            </span>
            <br />{{ record.connectTime }}
          </template>
        </span>
        <span slot="cusGender" slot-scope="text">
          <span v-if="text == 0">女装</span>
          <span v-else-if="text == 1">男装</span>
        </span>
        <span slot="contactType" slot-scope="text, record">
          <span v-if="text == 0">不用联系，直接搭</span>
          <span v-else-if="text == 1">{{ record.cennectPhone }}</span>
          <span v-else-if="text == 2">{{ record.wechatNumber }}</span>
        </span>
        <span slot="dealandsend" slot-scope="record">{{ record.dealBox }}/{{ record.sendBox }}</span>
        <span slot="transferTime" slot-scope="text, record">
          {{ transferTime(text) }}<br /><a-tag color="green" v-if="record.transferType != null" style="margin-top: 4px">{{ record.transferType | transferType }}</a-tag>
        </span>
        <span slot="ifDealer" slot-scope="text">
          <a-skeleton :loading="text == null" active style="width: 100px; margin: 0 auto" :paragraph="false">
            <a-badge :status="text | statusTypeFilter" :text="text | statusFilter" v-if="text != null" />
          </a-skeleton>
        </span>
        <span slot="img" slot-scope="text">
          <img :src="text" alt="" class="thumbnail" />
        </span>
        <span slot="transTime"><a-tag color="green">导购</a-tag></span>
        <span slot="checkMsg" slot-scope="text, record">
          <template>
            <a @click="checkMsg(record)">查看</a>
          </template>
        </span>
        <span slot="remark" slot-scope="text">
          <ellipsis :length="16" tooltip>{{ text }}</ellipsis>
        </span>
        <span slot="action" slot-scope="text, record">
          <template v-if="currentTab == 0">
            <template>
              <a @click="handleEdit(record)" v-has="'workbench:add'">搭盒</a>
              <a-divider type="vertical" v-has="'workbench:add'" />
            </template>

            <a @click="showModal(record, 'remark')">备注</a>
            <a-divider type="vertical" />

            <template>
              <a @click="showModal(record, 'change')" v-has="'workbench:update'">更换</a>
              <a-divider type="vertical" v-has="'workbench:update'" />
            </template>

            <a @click="showModal(record, 'cancel')">取消</a>
          </template>
          <template v-if="currentTab == 1">
            <a-popconfirm title="确定抢单?" ok-text="Yes" cancel-text="No" @confirm="confirmGarb(record)" @cancel="cancelGarb" v-has="'workbench:grab'">
              <a>抢单</a>
            </a-popconfirm>
          </template>
        </span>
      </s-table>
    </a-card>
    <UserMsg ref="msgModal"></UserMsg>
    <a-modal v-model="visible" centered :title="modalText" @ok="handleOk" :destroyOnClose="true">
      <div v-if="modalType === 'remark'">
        <p class="remark-name">用户昵称 {{ remarkCus }}</p>
        <p class="remark-title">本次服务备注</p>
        <a-textarea v-model="remarkValue" :auto-size="{ minRows: 3, maxRows: 5 }" :maxLength="50" />
        <p class="remark-title">会员备注</p>
        <a-textarea v-model="cusRemark" placeholder="请填写备注" :auto-size="{ minRows: 3, maxRows: 5 }" />
      </div>
      <div v-if="modalType === 'cancel'">
        <a-form layout="vertical" :label-col="{ span: 5 }" :wrapper-col="{ span: 12 }">
          <a-form-item label="用户昵称">
            <span>{{ mdl.nickName }}</span>
            <!-- <a-input placeholder="唯一识别码" v-model="mdl.id" id="no" :disabled="disabled" /> -->
          </a-form-item>
          <a-form-item label="取消原因" required>
            <a-select v-model="cancelReason">
              <a-select-option :value="item.name" v-for="(item, index) in cancelReasonList" :key="index">{{ item.name }}</a-select-option>
            </a-select>
          </a-form-item>
          <a-form-item label="备注" required>
            <a-textarea v-model="cancelRemark" placeholder="请填写备注" :auto-size="{ minRows: 3, maxRows: 5 }" />
          </a-form-item>
        </a-form>
      </div>
      <div v-if="modalType === 'change'">
        <a-form layout="vertical" :label-col="{ span: 5 }" :wrapper-col="{ span: 12 }">
          <a-form-item label="用户昵称">
            <span>{{ mdl.nickName }}</span>
            <!-- <a-input placeholder="唯一识别码" v-model="mdl.id" id="no" :disabled="disabled" /> -->
          </a-form-item>
          <a-form-item label="更换搭配师" required>
            <a-select v-model="changePerson" show-search :filter-option="filterOption">
              <a-select-option :value="item.id" v-for="(item, index) in changeList" :key="index">{{ item.name }}</a-select-option>
            </a-select>
          </a-form-item>
          <a-form-item label="更换理由" required>
            <a-textarea v-model="changeRemark" placeholder="请填写更换理由" :auto-size="{ minRows: 3, maxRows: 5 }" />
          </a-form-item>
        </a-form>
      </div>
      <div v-if="modalType == 'assignment'">
        <a-form layout="vertical" :label-col="{ span: 5 }" :wrapper-col="{ span: 12 }">
          <a-form-item label="更换搭配师" required>
            <a-select v-model="distributeFashioner" show-search :filter-option="filterOption">
              <a-select-option :value="item.code" v-for="(item, index) in allFashionerList" :key="index">{{ item.name }}</a-select-option>
            </a-select>
          </a-form-item>
        </a-form>
      </div>
    </a-modal>
    <SpreadModal ref="spreadModal" v-if="isFashioner"></SpreadModal>
  </div>
</template>
<script>
import { STable, Ellipsis, ChartCard, SpreadModal } from '../../components'
import { UserMsg } from '../../components'
import FilterTree from '@/views/box/components/FilterTree'
import Vue from 'vue'
import { USER_INFO, USER_AUTH } from '@/store/mutation-types'
import { fetchUserIsBlack } from '@/views/box/util/global'
import {
  getDealAmount,
  getFashionerByType,
  getChnnelType,
  askList,
  insertRemark,
  getByDescription,
  cancelAskBox,
  getChangeFashioner,
  changeFashioner,
  grabList,
  grabOrder,
  distributionOrders,
  getFashioners,
  batchCheckDealer,
  getCustomerAskBoxCondition,
  updateIsConnect,
  updateConnectSuccess,
  saveCustomer,
  staticsticFashionerData
} from '@/api/box/workbench'

const columns = [
  {
    title: '昵称',
    dataIndex: 'nickName',
    align: 'left',
    fixed: 'left',
    width: '170px',
    scopedSlots: { customRender: 'name' }
  },
  {
    title: '是否联系过',
    dataIndex: 'isConnect',
    align: 'left',
    width: '170px',
    scopedSlots: { customRender: 'isConnect' }
  },
  {
    title: '成交/发盒数',
    align: 'left',
    width: '120px',
    scopedSlots: { customRender: 'dealandsend' }
  },
  {
    title: '服饰类型',
    dataIndex: 'cusGender',
    align: 'center',
    width: '90px',
    scopedSlots: { customRender: 'cusGender' }
  },
  {
    title: '会员手机号',
    dataIndex: 'contactType',
    align: 'left',
    width: '165px',
    scopedSlots: { customRender: 'contactType' }
  },
  {
    title: '收货人手机号',
    dataIndex: 'logisticsPhone',
    align: 'left',
    width: '165px'
  },
  {
    title: '所属搭配师',
    dataIndex: 'fashionerName',
    align: 'left',
    width: '150px'
  },
  {
    title: '要盒时间',
    dataIndex: 'createTime',
    align: 'left',
    width: '150px'
  },
  {
    title: '流转时间',
    dataIndex: 'transferTime',
    align: 'left',
    width: '180px',
    scopedSlots: { customRender: 'transferTime' }
  },
  {
    title: '要盒需求',
    dataIndex: 'checkMsg',
    align: 'left',
    width: '120px',
    scopedSlots: { customRender: 'checkMsg' }
  },
  {
    title: '备注',
    dataIndex: 'remark',
    align: 'left',
    scopedSlots: { customRender: 'remark' }
  },
  /* {
    title: '是否为经销',
    dataIndex: 'ifDealer',
    align: 'center',
    width: '105px',
    scopedSlots: { customRender: 'ifDealer' }
  }, */
  {
    title: '操作',
    dataIndex: 'action',
    width: '200px',
    align: 'center',
    fixed: 'right',
    scopedSlots: { customRender: 'action' }
  }
]
const columnsGrab = [
  {
    title: '昵称',
    dataIndex: 'nickName',
    align: 'left',
    width: '150px',
    scopedSlots: { customRender: 'name' }
  },
  {
    title: '服饰类型',
    dataIndex: 'cusGender',
    align: 'center',
    width: '90px',
    scopedSlots: { customRender: 'cusGender' }
  },
  {
    title: '联系方式',
    dataIndex: 'contactType',
    align: 'center',
    scopedSlots: { customRender: 'contactType' }
  },
  {
    title: '用户留言',
    dataIndex: 'checkMsg',
    align: 'center',
    scopedSlots: { customRender: 'checkMsg' }
  },
  {
    title: '所属导购',
    dataIndex: 'fashionerName',
    align: 'center'
  },
  {
    title: '上次服务搭配师',
    dataIndex: 'lastFashionerName',
    align: 'center'
  },
  {
    title: '是否为经销',
    dataIndex: 'ifDealer',
    align: 'center',
    scopedSlots: { customRender: 'ifDealer' }
  },
  {
    title: '要盒时间',
    dataIndex: 'createTime',
    align: 'center'
  },
  {
    title: '操作',
    dataIndex: 'action',
    width: '100px',
    align: 'center',
    scopedSlots: { customRender: 'action' }
  }
]
const statusMap = {
  false: {
    status: 'success',
    text: '否'
  },
  true: {
    status: 'error',
    text: '是'
  }
}

export default {
  components: {
    STable,
    Ellipsis,
    ChartCard,
    UserMsg,
    FilterTree,
    SpreadModal
  },
  data() {
    this.columns = columns
    this.columnsGrab = columnsGrab
    return {
      timeType: '0', //时间判断
      userInfo: Vue.ls.get(USER_INFO),
      amount: 0,
      loading: true,
      queryParam: {
        fashionerType: '',
        channelId: '',
        // overdue: 'null',
        sorted: 1,
        fashionerId: '',
        salePhone: '',
        isBirthday: false
      },
      channelList: [], //渠道
      fashionerList: [],
      paginationProps: {
        total: 0,
        showTotal: total => `共有 ${total} 条数据`
      },
      // 加载数据方法 必须为 Promise 对象
      loadData: parameter => this.fetchList(parameter),
      // Modal
      visibleMsg: false,
      visible: false,
      visibleImgs: false,
      modalType: '',
      modalText: '',
      mdl: {},
      msg: {},
      allMsg: {},
      imgList: [],
      bigImgList: [],
      goToIndex: 0,
      remarkValue: '',
      cancelReason: '',
      cancelReasonList: [],
      cancelRemark: '',
      changeList: [],
      changePerson: '',
      changeRemark: '',
      queryGrabParam: {
        lastFashionerId: ''
      },
      currentTab: 0,
      columnsList: this.columns,
      selectedRowKeys: [],
      selectedRows: [],
      distributeFashioner: '',
      allFashionerList: [],
      getDealer: false,
      tableData: {},
      paramTree: [],
      authList: [],
      isFashioner: null,
      showGrabTab: null,
      baseTree: [],
      highParamTree: [],
      getIsConnent: false,
      cusRemark: '',
      remarkCus: '',
      todayCollocationNum: '', // 今日搭盒数量
      todayDealNum: '', // 今日搭盒数量
      todayOrderTotAmount: '', // 今日搭盒数量

      yesterdayCollocationNum: '',
      yesterdayDealNum: '',
      yesterdayOrderTotAmount: '',

      sevenCollocationNum: '',
      sevenDealNum: '',
      sevenOrderTotAmount: '',

      monthCollocationNum: '',
      monthDealNum: '',
      monthOrderTotAmount: '',
      collocationNum: '',
      dealNum: '',
      orderTotAmount: ''
    }
  },
  computed: {
    col() {
      if (this.userInfo.roleCode.length > 0) {
        if (this.userInfo.roleCode.indexOf('fashioner') > -1) {
          return 24
        } else {
          return this.queryParam.fashionerType === 'null' ? 16 : 8
        }
      } else {
        return this.queryParam.fashionerType === 'null' ? 16 : 8
      }
    },
    /* isFashioner() {
      if (this.userInfo.roleCode.length > 0) {
        if (this.userInfo.roleCode.indexOf('fashioner') > -1) {
          return true
        } else {
          return false
        }
      } else {
        return false
      }
    },
    rowSelection() {
      return {
        selectedRowKeys: this.selectedRowKeys,
        onChange: this.onSelectChange
      }
    }, */
    rowSelection() {
      return {
        selectedRowKeys: this.selectedRowKeys,
        onChange: this.onSelectChange
      }
    },
    transferTime(time) {
      return time => {
        if (time < 24) {
          return time + '时'
        } else {
          let day = parseInt(time / 24)
          return day + '天前'
        }
      }
    }
  },
  watch: {
    $route(to, from) {
      // console.log(to, from)
      if ((from.path.includes('/box/workbench/fashioner/selection') || from.path.includes('/box/workbench/fashioner/collocation')) && to.path === '/box/workbench/fashioner/list') {
        this.$refs.table.refresh()
      } else if (from.path === '/box/workbench/fashioner/list' && to.path.includes('/box/workbench/fashioner/selection')) {
        return false
      } else if (from.path.includes('/box/workbench/fashioner/selection') && to.path.includes('/box/workbench/fashioner/selection')) {
        return false
      } else if (to.path.includes('/box/workbench/fashioner/selection') && from.path.includes('/box/workbench/fashioner/selection')) {
        return false
      } else if (from.path === '/box/workbench/fashioner/list' && !(to.path.includes('/box/workbench/fashioner/selection') || to.path.includes('/box/workbench/fashioner/collocation'))) {
        //  重置页面
        console.log('******destroy*******')
        this.$destroy()
      }
      /* if (to.name === 'box-workbench-fashioner-list' && !(from.name.indexOf('selection') > -1 && from.name.indexOf('collocation') > -1)) {
          this.currentTab = 0
          this.columnsList = this.columns
          this.queryParam = {
            fashionerType: 'null',
            overdue: 'null',
            sorted: 0
          }
          this.queryGrabParam = {
            lastFashionerId: ''
          }
          this.$refs.table.refresh(true)
        } */
    },
    getDealer(val) {
      if (val) {
        this.getAllDealer()
      }
    },
    getIsConnent(val) {
      if (val) {
        this.getAllConnent()
      }
    }
  },
  filters: {
    statusFilter(type) {
      return statusMap[type].text
    },
    statusTypeFilter(type) {
      return statusMap[type].status
    },
    transferType(value) {
      switch (value) {
        case 0:
          return '搭配师'
        case 1:
          return '导购'
        /* case null:
          return '无'
          break */
      }
    }
  },
  created() {
    setTimeout(() => {
      this.loading = !this.loading
    }, 1000)
    // this.getDealAmount()
    this.getAskBoxCondition()
    this.getFashionerByType()
    this.getChnnelTypeList()
    this.fetchFashioners()
    this.staticsticFashionerData()
  },
  mounted() {
    this.authList = JSON.parse(sessionStorage.getItem(USER_AUTH) || '[]')
    if (this.authList.filter(e => e.action == 'workbench:notFashioner').length > 0) {
      this.isFashioner = false
    } else {
      this.isFashioner = true
    }

    if (this.authList.filter(e => e.action == 'workbench:grabTab').length > 0) {
      this.showGrabTab = true
    } else {
      this.showGrabTab = false
    }
  },
  methods: {
    clickDetail() {
      this.$router.push({ path: '/box/salesOrder/list', query: { timeType: this.timeType } })
    },
    // 业绩统计
    handleChangeTime(value) {
      switch (value) {
        case '0':
          this.collocationNum = this.todayCollocationNum || 0 // 今日搭盒数量
          this.dealNum = this.todayDealNum || 0 // 今日成交数量
          this.orderTotAmount = this.todayOrderTotAmount || 0 // 今日订单含券金额
          break
        case '1':
          this.collocationNum = this.yesterdayCollocationNum || 0 // 昨日搭盒数量
          this.dealNum = this.yesterdayDealNum || 0 // 昨日成交数量
          this.orderTotAmount = this.yesterdayOrderTotAmount || 0 // 昨日订单含券金额
          break
        case '7':
          this.collocationNum = this.sevenCollocationNum || 0
          this.dealNum = this.sevenDealNum || 0
          this.orderTotAmount = this.sevenOrderTotAmount || 0
          break
        case '30':
          this.collocationNum = this.monthCollocationNum || 0 // 月搭盒数量
          this.dealNum = this.monthDealNum || 0 // 月成交数量
          this.orderTotAmount = this.monthOrderTotAmount || 0 // 月订单含券金额
          break
      }
    },
    //统计数据
    staticsticFashionerData() {
      let params = {
        page: {
          pageNo: 1,
          pageSize: 10
        },
        requestData: {},
        user_id: this.userInfo.id
      }
      staticsticFashionerData(params)
        .then(res => {
          if (res.code === 0) {
            this.todayCollocationNum = res.data.todayCollocationNum || 0 // 今日搭盒数量
            this.todayDealNum = res.data.todayDealNum || 0 // 今日成交数量
            this.todayOrderTotAmount = res.data.todayOrderTotAmount || 0 // 今日订单含券金额
            this.collocationNum = res.data.todayCollocationNum || 0 // 今日搭盒数量
            this.dealNum = res.data.todayDealNum || 0 // 今日成交数量
            this.orderTotAmount = res.data.todayOrderTotAmount || 0 // 今日订单含券金额

            this.yesterdayCollocationNum = res.data.yesterdayCollocationNum || 0 // 昨日搭盒数量
            this.yesterdayDealNum = res.data.yesterdayDealNum || 0 // 昨日成交数量
            this.yesterdayOrderTotAmount = res.data.yesterdayOrderTotAmount || 0 // 昨天订单含券金额

            this.sevenCollocationNum = res.data.sevenCollocationNum || 0 // 一周搭盒数量
            this.sevenDealNum = res.data.sevenDealNum || 0 // 一周成交数量
            this.sevenOrderTotAmount = res.data.sevenOrderTotAmount || 0 // 一周含券金额

            this.monthCollocationNum = res.data.monthCollocationNum || 0 // 30搭盒数量
            this.monthDealNum = res.data.monthDealNum || 0 // 30成交数量
            this.monthOrderTotAmount = res.data.monthOrderTotAmount || 0 // 30订单含券金额
          } else {
            this.$message.error(res.msg)
          }
        })
        .catch(err => {
          console.log('搭盒数订单金额' + err)
        })
    },
    // 本月定制盒子成交金额
    getDealAmount() {
      getDealAmount(this.userInfo.id)
        .then(res => {
          if (res.code === 0) {
            this.amount = res.data
          } else {
            this.$message.error(res.msg)
          }
        })
        .catch(err => {
          console.log('本月定制盒子成交额' + err)
        })
    },
    tabsChange(key) {
      // this.queryParam.status = key
      // console.log(key)
      this.currentTab = key
      if (key == 0) {
        this.columnsList = this.columns
      } else if (key == 1) {
        this.columnsList = this.columnsGrab
      }
      this.$refs.table.refresh(true)
    },
    // 要盒列表筛选树
    getAskBoxCondition() {
      getCustomerAskBoxCondition().then(res => {
        if (res.code == 0) {
          let result = res.data
          if (this.isFashioner) {
            result = res.data.filter(e => e.name != '超期')
          }
          for (let item of result) {
            Object.assign(item, {
              isMuilt: false,
              isCustom: false,
              checkValue: [],
              checkList: []
              // radioValue: ''
            })
            if (item.name == '会员卡等级') {
              item.isMuilt = true
              // delete item.radioValue
            }
            if (item.name == '会员积分' || item.name == '集团年消费' || item.name == '流转时间') {
              item.isCustom = true
              item.cusArr = []
            }
          }
          this.baseTree = result.slice(0, 3)
          this.highParamTree = result.slice(3)
        } else {
          this.$message.warning(res.msg)
        }
      })
    },
    // 获取渠道筛选条件
    getChnnelTypeList() {
      getChnnelType()
        .then(res => {
          if (res.code === 0) {
            this.channelList = res.data
          } else {
            this.$message.error(res.msg)
          }
        })
        .catch(err => {
          console.log('根据类型获取搭配师:' + err)
        })
    },
    // 根据类型获取搭配师
    getFashionerByType() {
      // if (this.queryParam.fashionerType == 0) {
      getFashionerByType(0)
        .then(res => {
          if (res.code === 0) {
            this.fashionerList = res.data
          } else {
            this.$message.error(res.msg)
          }
        })
        .catch(err => {
          console.log('根据类型获取搭配师:' + err)
        })
      // }
    },
    // 改变搭配师类型
    handleChangefashType(value) {
      // console.log(value)
      if (value === 0) {
        this.getFashionerByType()
        delete this.queryParam.salePhone
      } else if (value === 'null') {
        delete this.queryParam.salePhone
        delete this.queryParam.fashionerId
      } else if (value === 1) {
        delete this.queryParam.fashionerId
      }
    },
    handleChangeType(value) {
      this.queryParam.fashionerId = ''
      this.queryParam.salePhone = ''
      this.searchList()
    },
    handleChange(value) {
      this.searchList()
    },
    filterOption(input, option) {
      return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
    },
    // 导购手机号
    onChangePhone(e) {
      if (e.type == 'click') {
        this.searchSalesPhone()
      }
    },
    searchSalesPhone() {
      this.$refs.salesPhone.blur()
      this.searchList()
    },
    // 搜索
    searchList() {
      if (this.currentTab == 0) {
        if (this.queryParam.search) {
          this.queryParam.search = this.queryParam.search.replace(/\s/g, '')
        }
      } else if (this.currentTab == 1) {
        // console.log(this.queryGrabParam)
      }
      this.$refs.table.refresh(true)
    },
    // 重置
    resetList() {
      if (this.currentTab == 0) {
        this.queryParam = {
          fashionerType: 'null',
          overdue: 'null',
          sorted: 0
        }
      }
      if (this.currentTab == 1) {
        this.selectedRowKeys = []
        this.queryGrabParam = {
          lastFashionerId: ''
        }
      }
      this.$refs.table.refresh(true)
    },
    // 查看留言
    checkMsg(record) {
      this.$refs.msgModal.show(record)
    },
    async handleEdit(record) {
      let result = await fetchUserIsBlack(record.unionId)
      if (result) {
        this.$message.warning('黑名单用户，无法下盒!')
        return
      }

      if (this.userInfo.roleCode.indexOf('fashioner') !== -1 || this.userInfo.roleCode.indexOf('10003') !== -1) {
        gio('track', 'event_build_box', { cur_fashioner_id: this.userInfo.phone, cur_unionid: record.unionId })
      }
      this.$router.push(`/box/workbench/fashioner/selection/${record.unionId}/${record.id}`)
    },
    // 获取取消理由
    getByDescription() {
      if (this.cancelReasonList.length === 0) {
        getByDescription('自主要盒-后台端')
          .then(res => {
            if (res.code === 0) {
              this.cancelReasonList = res.data
            } else {
              this.$message.error(res.msg)
            }
          })
          .catch(err => {
            console.log('获取取消理由:' + err)
          })
      }
    },
    // 取消主动要盒
    cancelAskBox() {
      // console.log(this.mdl, this.cancelReason, this.cancelRemark)
      if (this.cancelReason && this.cancelRemark) {
        const data = {
          requestData: {
            cancelMsg: this.cancelReason,
            id: this.mdl.id,
            remark: this.cancelRemark
          },
          user_id: this.userInfo.id
        }
        cancelAskBox(data)
          .then(res => {
            if (res.code === 0) {
              this.$message.success('取消成功！')
              this.visible = false
              this.mdl = {}
              this.$refs.table.refresh()
            } else {
              this.$message.error(res.msg)
            }
          })
          .catch(err => {
            console.log('取消主动要盒:' + err)
          })
      } else {
        this.$message.error('请选择理由及填写备注！')
      }
    },
    // 获取可更换搭配师
    getChangeFashioner(id) {
      getChangeFashioner(id)
        .then(res => {
          if (res.code === 0) {
            this.changeList = res.data
          } else {
            this.$message.error(res.msg)
          }
        })
        .catch(err => {
          console.log('获取可更换搭配师' + err)
        })
    },
    // 更换搭配师
    changeFashioner() {
      if (this.changePerson && this.changeRemark) {
        const data = {
          requestData: {
            fashionerId: this.changePerson,
            id: this.mdl.id,
            remark: this.changeRemark
          },
          user_id: this.userInfo.id
        }
        changeFashioner(data)
          .then(res => {
            if (res.code === 0) {
              this.$message.success('更换搭配师成功！')
              this.visible = false
              this.$refs.table.refresh()
              this.changeList = []
              this.changePerson = ''
              this.changeRemark = ''
              this.mdl = {}
            } else {
              this.$message.error(res.msg)
            }
          })
          .catch(err => {
            console.log('更换搭配师:' + err)
          })
      } else {
        this.$message.error('请选择要更换的搭配师/导购及更换理由！')
      }
    },
    showModal(record, type) {
      // console.log(record, type)
      this.mdl = record
      switch (type) {
        case 'remark':
          this.modalText = '备注'
          this.modalType = 'remark'
          this.remarkValue = record.remark
          this.remarkCus = record.nickName
          this.cusRemark = record.bgRemark
          break
        case 'change':
          this.modalText = '更换搭配师'
          this.modalType = 'change'
          this.changePerson = record.fashionerId
          this.getChangeFashioner(record.id)
          break
        case 'cancel':
          this.modalText = '取消'
          this.modalType = 'cancel'
          this.getByDescription()
          this.cancelReason = ''
          this.cancelRemark = ''
          break
        case 'assignment':
          this.modalText = '分配搭配师'
          this.modalType = 'assignment'
      }
      setTimeout(() => {
        this.visible = true
      }, 200)
    },
    handleOk(e) {
      // console.log(e)
      switch (this.modalType) {
        case 'remark':
          this.insertRemark()
          break
        case 'cancel':
          this.cancelAskBox()
          break
        case 'change':
          this.changeFashioner()
          break
        case 'assignment':
          this.handleDistribute()
          break
      }
    },
    // 填写备注
    async insertRemark() {
      const id = this.mdl.id
      await insertRemark(id, this.remarkValue)
        .then(res => {
          if (res.code === 0) {
            this.$message.success('本次服务备注编辑成功！')
            setTimeout(() => {
              this.mdl.remark = this.remarkValue
            }, 200)
          } else {
            this.$message.error(res.msg)
          }
        })
        .catch(err => {
          console.log('填写备注：' + err)
        })
      let params = {
        requestData: {
          bgRemark: this.cusRemark,
          id: this.mdl.customerDetailId
        }
      }
      await saveCustomer(params).then(res => {
        if (res.code === 0) {
          this.$message.success('会员备注编辑成功！')
          setTimeout(() => {
            this.mdl.bgRemark = this.cusRemark
          }, 200)
        } else {
          this.$message.error(res.msg)
        }
      })
      this.visible = false
    },
    // stable
    async fetchList(parameter) {
      let result

      if (this.currentTab == 0) {
        result = await this.fetchData(parameter)
        this.getIsConnent = true
      } else if (this.currentTab == 1) {
        result = await this.fetchGrabList(parameter)
      }
      if (result.code == 0) {
        this.tableData = {
          data: result.data,
          page: result.page
        }
        this.getDealer = true
        return this.tableData
      }

      // this.$message.error(result.msg)
      let data = {
        page: {
          pageNo: 0,
          count: 0,
          pageSize: 10
        },
        data: []
      }
      return data
    },
    fetchData(parameter) {
      const queryParam = JSON.parse(JSON.stringify(this.queryParam))
      /* if (queryParam.overdue === 'null') {
        delete queryParam.overdue
      }
      if (queryParam.fashionerType === 'null') {
        delete queryParam.fashionerType
      }
      if (queryParam.fashionerId === 'null') {
        delete queryParam.fashionerId
      }*/
      queryParam.isHaveUnUsedBirthCoupon = this.queryParam.isBirthday ? 1 : 0
      delete queryParam.isBirthday
      const params = {
        page: parameter,
        requestData: queryParam,
        user_id: this.userInfo.id
      }
      return askList(params).then(res => {
        return res
      })
    },
    fetchGrabList(parameter) {
      let midParam = {}
      Object.keys(this.queryGrabParam).forEach(e => {
        if (e == 'time' && e.length > 0) {
          midParam.searchStartDate = this.queryGrabParam[e][0]
          midParam.searchEndDate = this.queryGrabParam[e][1]
        } else {
          midParam[e] = this.queryGrabParam[e].trim()
        }
      })
      const params = {
        page: parameter,
        requestData: midParam
      }
      return grabList(params).then(res => {
        return res
      })
    },
    // 批量查询用户是否经销
    async getAllDealer() {
      if (this.tableData.data.length > 0) {
        let unionIdList = this.tableData.data.map(e => e.unionId)
        let list = await this.fetchBatchCheckDealer(unionIdList)
        if (list.length > 0) {
          for (let item of this.tableData.data) {
            let ifDealer = list.filter(e => e.unionId == item.unionId)[0].ifDealer
            item.ifDealer = ifDealer
          }
        }
      }
      this.getDealer = false
    },
    fetchBatchCheckDealer(list) {
      let params = {
        requestData: {
          unionIdList: list
        }
      }
      return batchCheckDealer(params).then(res => {
        if (res.code == 0) {
          return res.data
        } else {
          this.$message.error(res.msg)
          return []
        }
      })
    },
    async getAllConnent() {},
    // 更新联系
    updateConnect(record, isConnect) {
      let params = {
        id: record.id,
        isConnect: isConnect
      }
      updateIsConnect(params).then(res => {
        if (res.code == 0) {
          record.isConnect = isConnect
          record.connectTime = res.data.connectTime
          if (isConnect == 0) {
            this.updateConnectSuccess(record, 0)
          }
        }
      })
    },
    updateConnectSuccess(record, success) {
      let params = {
        id: record.id,
        connectSuccess: success
      }
      updateConnectSuccess(params).then(res => {
        if (res.code == 0) {
          record.connectSuccess = success
          record.connectTime = res.data.connectTime
        }
      })
    },
    onSelectChange(selectedRowKeys, selectedRows) {
      // console.log(selectedRowKeys, selectedRows)
      this.selectedRowKeys = selectedRowKeys
      this.selectedRows = selectedRows
    },
    // 抢单
    confirmGarb(record) {
      let params = {
        requestData: {
          id: record.id
        }
      }
      grabOrder(params).then(res => {
        if (res.code == 0) {
          this.$message.success('抢单成功！')
          this.$refs.table.refresh()
        } else {
          this.$message.error(res.msg)
        }
      })
    },
    cancelGarb() {},
    // 分配
    handleDistribute() {
      let params = {
        requestData: {
          fashionerId: this.distributeFashioner,
          ids: this.selectedRows.map(e => e.id)
        }
      }
      distributionOrders(params).then(res => {
        if (res.code == 0) {
          this.$message.success('分配成功！')
          this.visible = false
          this.distributeFashioner = ''
          this.$refs.table.refresh()
        } else {
          this.$message.error(res.msg)
        }
      })
    },
    // 搭配师列表
    fetchFashioners() {
      getFashioners().then(res => {
        if (res.code == 0) {
          this.allFashionerList = res.data
        } else {
          this.$message.error(res.msg)
        }
      })
    },
    // 有可用生日折扣券
    switchChange(checked) {
      this.searchList()
    },
    // 筛选条件
    updateParams(baseData, highData) {
      console.log(baseData, highData)
      let paramsArr = baseData ? JSON.parse(JSON.stringify(baseData)) : []
      let paramsHighArr = highData ? JSON.parse(JSON.stringify(highData)) : []
      if (paramsArr.length > 0) {
        // 会员卡等级
        this.queryParam.vipTypes = paramsArr.filter(e => e.title == '会员卡等级')[0].codes

        // BOX总消费金额
        let consumeAmount = paramsArr.filter(e => e.title == 'BOX总消费')[0]
        if (consumeAmount.codes.length > 0) {
          if (consumeAmount.codes[0] === '-1') {
            this.queryParam.consumeAmountMax = 0
            this.queryParam.consumeAmountMin = ''
          } else {
            this.queryParam.consumeAmountMin = consumeAmount.codes[0]
            this.queryParam.consumeAmountMax = ''
          }
        } else {
          this.queryParam.consumeAmountMin = ''
          this.queryParam.consumeAmountMax = ''
        }

        // 会员积分
        let customerPoint = paramsArr.filter(e => e.title == '会员积分')[0]
        if (customerPoint.isCustom && customerPoint.cusArr.length > 0) {
          this.queryParam.customerPointMin = Number(customerPoint.cusArr[0]) > -1 && customerPoint.cusArr[0] != null ? customerPoint.cusArr[0] : ''
          this.queryParam.customerPointMax = Number(customerPoint.cusArr[1]) > -1 && customerPoint.cusArr[1] != null ? customerPoint.cusArr[1] : ''
        } else {
          this.queryParam.customerPointMin = ''
          this.queryParam.customerPointMax = ''
        }
      }
      if (paramsHighArr.length > 0) {
        // 集团年消费金额
        let groupYearsConsume = paramsHighArr.filter(e => e.title == '集团年消费')[0]
        console.log(groupYearsConsume)
        if (groupYearsConsume.isCustom && groupYearsConsume.cusArr.length > 0) {
          this.queryParam.groupYearsConsumeMin = Number(groupYearsConsume.cusArr[0]) > -1 && groupYearsConsume.cusArr[0] != null ? groupYearsConsume.cusArr[0] : ''
          this.queryParam.groupYearsConsumeMax = Number(groupYearsConsume.cusArr[1]) > -1 ? groupYearsConsume.cusArr[1] : ''
        } else {
          this.queryParam.groupYearsConsumeMin = ''
          this.queryParam.groupYearsConsumeMax = ''
        }

        // 上次消费距离今
        let lastConsumeToToday = paramsHighArr.filter(e => e.title == '上次消费')[0]
        if (lastConsumeToToday.codes.length > 0) {
          if (lastConsumeToToday.codes[0] == '-361') {
            this.queryParam.lastConsumeToTodayMin = '361'
            this.queryParam.lastConsumeToTodayMax = ''
          } else if (lastConsumeToToday.codes[0] == '-1') {
            this.queryParam.lastConsumeToTodayMin = ''
            this.queryParam.lastConsumeToTodayMax = '0'
          } else {
            this.queryParam.lastConsumeToTodayMax = lastConsumeToToday.codes[0]
            this.queryParam.lastConsumeToTodayMin = '0'
          }
        } else {
          this.queryParam.lastConsumeToTodayMax = ''
          this.queryParam.lastConsumeToTodayMin = ''
        }

        // 流转时间
        let transferTime = paramsHighArr.filter(e => e.title == '流转时间')[0]
        this.queryParam.transferTimeMax = ''
        this.queryParam.transferTimeMin = ''
        if (transferTime.isCustom && transferTime.cusArr.length > 0) {
          this.queryParam.transferTimeMin = Number(transferTime.cusArr[0]) > -1 && transferTime.cusArr[0] != null ? transferTime.cusArr[0] : ''
          this.queryParam.transferTimeMax = Number(transferTime.cusArr[1]) > -1 ? transferTime.cusArr[1] : ''
        }
        // 流转类型
        let transferType = paramsHighArr.filter(e => e.title == '流转类型')[0]
        if (transferType.codes.length > 0) {
          this.queryParam.transferType = transferType.codes[0]
        } else {
          this.queryParam.transferType = ''
        }

        // 超期
        if (!this.isFashioner) {
          let overdue = paramsHighArr.filter(e => e.title == '超期')[0]
          if (overdue.codes.length > 0) {
            this.queryParam.overdue = overdue.codes[0]
          } else {
            this.queryParam.overdue = ''
          }
        }

        // 是否联系
        let isConnect = paramsHighArr.filter(e => e.title == '是否联系')[0]
        if (isConnect.codes.length > 0) {
          this.queryParam.isConnect = isConnect.codes[0]
        } else {
          this.queryParam.isConnect = ''
        }
      }
      // console.log('updateParams', paramsArr, paramsHighArr)
      // console.log(this.queryParam)
      this.searchList()
    },
    updateSearchText(text) {
      this.queryParam.search = text
      this.searchList()
    },
    // 打开推广弹窗
    openSpreadModal() {
      this.$refs.spreadModal.show()
    }
  }
}
</script>
<style lang="less" scoped>
/deep/.top-card {
  .ant-card-body {
    padding-top: 8px;
    padding-bottom: 4px;
    .tags-content .title {
      width: 82px;
    }
  }
}
.amount-card {
  /deep/ .total {
    margin-top: 12px;
  }
  /deep/ .chart-card-content {
    height: auto;
  }
}
.like-theme {
  position: relative;
  display: inline-block;
  p {
    text-align: center;
    position: absolute;
    bottom: -4px;
    width: 100px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 12px;
  }
}
.imgs {
  width: 100px;
  height: 100px;
  object-fit: scale-down;
  padding: 10px;
  border: 1px dashed #cdcdcd;
  margin-right: 10px;
  margin-bottom: 10px;
  cursor: pointer;
}
.ant-carousel {
  .carousel-imgs {
    height: 60vh;
    overflow: hidden;
    img {
      height: 90%;
      margin: 0 auto;
    }
  }
  .dots-imgs {
    width: 50px;
    height: 50px;
    border: 1px solid #cdcdcd;
    padding: 5px;
  }
  .slick-next::before {
    content: '';
  }
  .slick-prev::before {
    content: '';
  }
  .custom-slick-arrow {
    width: 25px;
    height: 25px;
    font-size: 25px;
    color: rgb(116, 116, 116);
    background-color: transparent;
    opacity: 1;
    z-index: 2;
  }
  /deep/ .slick-dots-bottom {
    bottom: 50px;
    li {
      margin: 0 5px;
    }
  }
}
.msg-desc {
  padding-top: 12px;
  /deep/ .ant-descriptions-item-label {
    width: 25%;
    text-align: right;
    float: left;
  }
  /deep/ .ant-descriptions-item-content {
    width: 73%;
    margin-left: 12px;
    display: flex;
    flex-wrap: wrap;
  }
}
.table-tag {
  margin-right: 4px;
  margin-top: 4px;
}
/deep/ .ant-table-tbody tr {
  height: 79px !important;
}
.remark-name,
.remark-title {
  height: 22px;
  font-size: 14px;
  font-family: PingFangSC-Medium, PingFang SC;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.85);
  line-height: 22px;
}
.remark-title {
  font-weight: 400;
  margin-bottom: 8px;
  margin-top: 40px;
}
</style>

